
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package be.ac.ua.pats.thesisrobotica.robot.communication;

import lejos.nxt.comm.RConsole;

/**
 * Abstraction for a sendable object (over a connection)
 *
 * @author Jimmy
 */
public abstract class Sendable {
    protected abstract String encapsulate();

    public void send(Connection connection) {
        RConsole.println("going to send");
        connection.send(this.encapsulate());
    }
}
